better location matching
debug output