Distance version 1