[Square] Add computeCost function