rewrite of store system