add main loop
Merge branch 'master' of https://github.com/Frumba/SPT-BJTU