some useful bc functions