added error checking for input and dive default