Added bd function.