fetch and store data in controller