updated enter and backspace functions