implemented full functionality for switchDay function