implemented template creation (producer and consumer)