modify some methods in Analyzer to cater the invalid input cases