Added repeat, removed some additional code