added p tag lost in refactor, restoring legend style