Implemented render function