added implementation of dehooking