added error handling and slide page