Added functions for most of recursion