cleaned up a memcpy