use formatData to use the chain