add of main core loop