An algorithm for constructing high-quality bandpass filters