Rewrite store func.