adding function to dismiss the keyboard