added button actions and functions for the slides