using 2d vars and new chaining method