code improvement, issue #13