write code for render()