change method of getting app data to controllers