removed $localStorage dependency