added checks for empty strings