added bmtool.c and bmtool.h