work in issues #23 and #24