removed rejectArguments array and count and also made some improvement in when