pre-processing least states