implemented qos in db