Update main.cpp

state prediction running in the loop - initialisation fault