reorder function

fixed decimal error