Added preprocessing part