Added getAttributes function