Preprocessing Todo: preprocessing should be a class in the program, this version is for testing purposes.