added function BEAGLE_divide