renamed functions and robusted hook