memmove instead of memcpy