trying different way to get memcpy to work