minor refactoring to deal with invalid entries