added api controller
added output in test