Implemented Preprocessing