added 3 button functionality on mem3