Removed redundancy in is_upside_down