cleanup bounds logic a bit