minor improvements needing test