what are two factors affect water quality