fixed custom markers, distance formula