adding controller for accessing function data