Update generic_functions.sh