change enter function to use submit() instead of trigger()