added more output control