added direct output method