minor new functions, and new test