better unit and integration tests