Added code for vertical words