improved changes for #81