calculate exact limits, rather than hard-coded guess