final_proj.pl add init for future testing
final_proj.pl fix problems with merging and reset head