created cube drawing function