added hooks, pushing code so pmorie can see