slightly different way to save items to local storage, and also store priority properties