added loop to remove game elements when screen size too small