added a switching machine