more precise bounce logic