more levels, fixing bug with duplicate variables