added some hooks