Added logic to make display smoother