Add load() function to main.c