Use functions instead of lambdas