updated output method