added the tests for display and coded logic for display