added sleeps. fixed encoding issues