add permission and tests