boss added, changed switch with if-else