rewrote display func