add default cases not to show warnings on compiling
add new lines at the end of error messages. reduce switch-case branch