added error handling and most values