[Update code]Refiend the location class