restructuring preprocessing