recursion version working with numbers