updated square and tests