Added preliminary prepocessing