debug: modified with_three_values so that it returns a/result as well when right