basic logic for slides on homepage