add structmap function for controller