rewriting of onStore