added coppying data in to a own buffer