editing function refactored to use marker instead of circle.