Biofilm characterization and activity analysis in water and wastewater treatment