remove fmt package and fix assignment error