use memcpy() instead of memmove() if data doesn't overlap