modified makefile, fixed heap bug, implemented algorithm, few bugs left