Added distance and angle calculations