We present a novel implementation of smoothed particle hydrodynamics that uses the spatial derivative of the velocity divergence as a higher order dissipation switch. Our switch – which is second order accurate – detects flow convergence before it occurs. If particle trajectories are going to cross, we switch on the usual SPH artificial viscosity, as well as conservative dissipation in all advected fluid quantities (e.g. the entropy). The viscosity and dissipation terms (that are numerical errors) are designed to ensure that all fluid quantities remain single valued as particles approach one another, to respect conservation laws, and to vanish on a given physical scale as the resolution is increased. SPHS alleviates a number of known problems with ‘classic’ SPH, successfully resolving mixing, and recovering numerical convergence with increasing resolution. An additional key advantage is that – treating the particle mass similarly to the entropy – we are able to use multimass particles, giving significantly improved control over the refinement strategy. We present a wide range of code tests including the Sod shock tube, Sedov–Taylor blast wave, Kelvin–Helmholtz Instability, the ‘blob test’ and some convergence tests. Our method performs well on all tests, giving good agreement with analytic expectations.