updated output initialization method