recursive function categories(not finished)