added including algorithm header
merge master of egl/main.cc