debugging pedLoop