optimistic locking implementation start