added location check