consider putting the hook's result in the if clause?