Update useful_functions.R