Converting closures to DQL