changed some hooks