Creating and using a helper render() function