added makefile
fixed register event