Done the best I could but the render method has some issues