add test before calling memmove, implementation doesn't test whether destination and source are the same.