added some localStorage functionality