updated MainActivity
 (no result if input data is wrong and exception is thrown)