refractor hooking methods to use a cleaner, less-hard coded approach