merge PR122 for #44 on the original source