Rewriting methods to determine solution to Phil's new rules