input tests and try catch for formating