Added custom memory move subroutine