Development of a reliable alkaline wastewater treatment process: optimization of the pre-treatment step