switch order of send api