bounds calculation is now correct