finish steps 5 and 6 in threading