simplified the main app render loop