add size function. Fix equals function