added helper functions to arm-belief.cpp