fixed glitch, added more output messages