updated code from prev labs to lab8