Finished this function for course work

Finished this function for course work.
need to update path if used on Mac/Unix