added constraint input pattern and image