adding to check whether slides were selected