last function, switch condition statement