adding integration tests and fixes