for pull
add Memory implementation to UI and key events hanling