Need to comeup with preprocessing algorithms.