add controller and tests