minor improvements to python interface