init location field correctly