laga utility_functions.c