same move all callback definitions to hooks.rb