merge check.c into query.c & add instruction for remove.c