[hooks] "exists" - tests
[hooks] hooks implemented; +refactored for modularity