implement finish state