Development of a membrane-assisted hybrid bioreactor for ammonia and COD removal in wastewaters