layout, switchSide fn working