Adding version and optimistic locking