some improvements for #10