updated consumer-producer