Issues resolved

1. Change name of method to checkAll.
2. Optimise the code.