creates modification function