bug fix: calculate the wrong max
c++11 could detect this just well
add DEBUG output
output the result
add the upload script
only include the *.h and *.cpp files for uploading