completed the new idea code