added location checking on client side