lab 3 finite state machine implementation 3750909