almost done; need 2fix recursive_helper though