add EnableLocation logic