updated function __list_for_each

changed to list_for_each