started refactoring code for allowing recursive functions
iapojdoiasjdoiajds