remove threephase; it's a broken algorithm :(