refactor for the better issue #18