add *.__i
write endpoint buffer function