cleaned the code for $display