modified to regain sync automatically, removed thread sleep

removing the thread sleep helps with serial communication