added comments and fixed the next element selection with enter