another attempt at assignment 6 #6