all the functions need be declared as `static inline`