redo PR for #24

see #24