memcpy instead of loop