some work on square.cpp