added functionality for the verbose flag
beginning to clean up code
commented the functions