put main loop in so can do simple console commands