make the controller working with typescript