working version with growing tables but still debugging to do