corrected order of commands for draw