add responseMap property, splitting up callback() into several methods