add protocol constraint, fix typo