added a bunch of tests and rewrote the data negotiation controller method