use array.all?
Merge pull request #8 from ranjib/refactor

Minor refactoring