updating assignment after Charlie's help.