mild refactor of name input to accept path object