adds error tests and uses Response module