added equality replacing option