implemented prehooks and posthooks, wrote some more tests. will need to improve pre/post impl later though