Start of state machine for reading inputs