wrote part of queue class