switch in extend