Removed unused var $hook