adding functions simulate data and to calculate measure estimates