debugging output added