Added option to return only a single value