move read function to tetris