rename file.cpp -> main.cpp / fixed some bugs