removed a memcpy, should be faster