wrote test part of FUNCTIONAL chop
bug fix: added break in switch-case block