Added #include<functional> to pass build