tidied up, new makefile, with problems