improve validation and search