implemented states search