added and implemented the protect directive