Finished implementing queue functionality