implemented support for returning results including priority and weight