adding render loop methods