work on render function again