added as_ref wrapper for input ranges