improved rendering
introduced main-loop