Application of a smart dosing pump algorithm in identifying real-time optimum dose of antiscalant in reverse osmosis systems