wip main loop
merge