change trailing zeros function makes a few cases work whaaaat