Added memory output functionality