improving title validation