added basic localStorage handling