some more improvements for #71
some more improvements for #71 2