Added bham routines for testing.