changed rendering from rectangles to sprites