made search only work on enter