add more part of lapi.c in 5