working on integration tests. not working quite right.