Add memory reading functions