added debug output for compass algorithm