Adding graphics loop