added code to dismiss keyboard when tap elsewhere