fixed all functions to work per slide