move from OO to FP
move from OO to FP - 2