all tests refactored and passing

Signed-off-by: Alfredo Deza <alfredo@deza.pe>