improved hook scripts