more changes and tests

more changes and tests