make enterpressed working, and remove pointer