adding hooks and Makefile