added loop, higher speed too