made storeprotocol logic portable