revised assignment6