display information based on condition