added render function