used memcopy instead for server code