Revert "fixed switch statement"

This reverts commit 7e8690e2b251fc7f1056a4899851136fafe57c18.
fix the order of the bitmasking