added stop and toggleloop methods