add a quality helper

assuming quality is always an integer, which I believe is true