add credits for borrowed code from RMQEngine