Implemented square merge and operator overloading