producer and consumer code coming together