adding parseLocation method