first commit for lab6
lab 6 commit 4, added flow chart and made minor corrections to code