implement operator both