smarter squares
cleanup