CHANGE: removed restriction about at least 3 slides. Now it can handle any number of slides greather than 0.