changing code about format judgement