implementing operators for array