extending localstorage to store objects