another refactor of the switches in LS