Updated useful_functions to match the one in capo