added queue and initial part 3