added initialize and onRender functions