qs_fn