three wire method formula