updated for TwiGrid 2