finished jobs querying functions