added transitions and implementation comments