some tests actualized, some logic was fixed.