wrote initial js class for location objects.