Compiled on mac w/o #include <algorithm> but needed it on cloud9