working
working version with extra credit
Working exercise 6 with all extra credit and pretty functions