Added printing functionality