add poly function is fixed to actually work correctaly