recusion to fn