Update forwardsim.R