hardening some of the logic