removed unused prints
removed unused code
removed extra spaces
new pending handler naming