remove all uncessary code. it was used to create pixel replicated buffer but we already solved that problem