adding the codes for MCtest