added render function for rendering the sprites