minor changes and tests