add tests and controller