recursion added stuff from other tutorials