fix spelling error
fix NaN error
fix main