added changes and more tests