program now requires g++ >=4.5 for lambda function support, now want to concantenate all fns and return, likely run into memory sharing issues