Add code on BP implementation