added postprocessing and check constraint