added code for memory pressure