Change to use existing parseAttributes function