changed the background image and refactored some code