seperate src and a demo
exchange static inline to directly macro define