James -> simple refactoring using isEmpty where possible