remove redundant parentheses
refactor display function