add bp generation routine