Added printing function.