Implements both 2 and 4 states error.