koa style downstream and upstream for lua