move display logic into else clause.