corrected sql query, cleaned Makefile