working on fixing recursion issues