added getMaxProgLine function