*missed a break
*corrected if-clause