refactoring last change slightly to return