refactor fname