added render() function