bufixes and working on recursion