first working version

main.cpp contains a demo for testing the classes