replayer: extract consumer code