modified display code