added function for render window