write localStorage and many modifications