add security constraints (doesn't works yet)