added BMP code