active day swithch code implemented