final monte carlo handin version