fix unique field
add update for api implementation