thread and printer class updated