function schema in controllers