more switch function places