distance feature added
minor changes