functions completed

now just making some final edits to turn in assignment and finishing the
flowchart