the main loop WIP; cannot really run yet