accepting strings as ids; refactoring