refactored a little
amqp added