fixed integration and unit tests