Added lambda functions for finding paths.