made localstorage listener business more understandable