moving the main and other non-magic-square stuff from magic-square.cpp