Update main.cpp

implemented physics part