small refactoring
add worst test