better format, check for memory existence