storing of categories and stories in local storage