first and last switch