some refactoring
add tests (t/05-07)