Fn refactor