For smoothly bounded, multiply connected domains in the complex plane, S. Bell showed how the Kerzman-Stein method can be used to compute the Szegő kernel and Ahlfors map. In this paper, we present a modification of that method for domains that are piecewise-smooth. The procedure is based on a method of preliminary transformation and involves adding an explicit holomorphic function to the Cauchy kernel. In the last section, we show the effectiveness of using this method for the special case of a square. 2004 Elsevier Inc. All rights reserved.