updated bap build script