fixed multiline output functionality