almost finsihed with integration tests