trying to make threading work