refactoring : putting the cosntraint creation in own file