updated with index
fixes, added dynamic detection of slides