The application of boron-doped diamond thin-film electrodes for water treatment and water quality monitoring