Added location detection