added functionality to queue