improving behavior to consider only update record and dont fail on insertion