support both array args and object args