Adding slides show logic