added sams main.cpp