saperate state machine define to header file
add timer module and http get function