use Lambda to recode main.js of pos_v1