hooks for security and customization