working with three foci