ex 1 and 3 along with Makefile