now with warning for right input and formatted result