refactor checks to see if objects are at edge of screen