added hook permission snippet