improving constrain