implemented result display using innerHTML