getting function to get item from local storage