convert the types controller to service
convert the types controller to service