make header functions static inline
add decoder