calling max instead of min in test