use distance() function instead of property