moved parse-and-send to a callback