update header
add matrix template func
add Reed-Solomon code