Memory hungry method for 413 (runs in 15 mins).