create twoInRowVertically function