added checking for qualities