Changed Trials to iterations - T*N and added Error Checking