Working on render loop