fixed edit functions