debug output added