implemented first and second serialAB algorithms, included timers