leveraging constraints, bug fixes