memmove is much faster than move elements one by one