finding flattest water region phase factor combinations