complete code untill slide show