add model getAttributes function