added function for QPS