change classes, work with check's algorithm

change type variables, structure data.
Work with check's algorithm(add some methods for check)