oops.. fixed bad switch case
few more undefined <x> errors
type mismatch error