distmesh api uses Functional class