so many bugs (plus makefile)