implements some tetris modules of js