major changes, added repeat and more