add closed and closed at attributes for tasks
add task scopes and close method