update to support non array responses