separating output method from computation methods