minor edits, adding a new test function