Replace hook() function with Hook class