Implemented hooks (need to test)