v1.1

error handling on switch function