refactoring storage mechanism and add it to a new helper file named storage
update favorites