Main loop will run about 30 time per second