html tag issue, nicer ruby code