added function to render pixels