changed controller js object to ts class