added player location detection