added control attributes to tasks
added toArray support