solved a problem with bug and check the tests #28