Added functions to prevent undefined name errors