added conditional for constraint kind