added a draw loop