Tried removing main loop