added function to disable enter