Modified main.c - added start and end functions