work in issue #25 and #24