Added output functionality