Creating the update function, responsible for drawing all the objects on the screen