swap robot.http to msg.http in functions