adapted main.cpp
adapted main.cpp and Makefile
merged changes