added controller and api