On the nitrogen and phosphorus removal in algal photobioreactors