switched interative element copy to memcpy