memcopy works in simulation