kleene method in BuildAutomaton class added