refactored local? to be more readable