two different hook methodes