added functionality outline in top of main.c