assignment 5 initial commit

several bug fixes for assignment 4 and initial base template for
assignment 5