add material fun done with all constraints