changed tetris to index for phonegap