add two algorithms )ct 28th