inline tasks() function