Added hook calls

Fixed #3