adding enter key functionality to prototype