implemented states being in accepting state