getting result display working properly