added warning messages for invalid inputs