added checks for empty content