Added methods for building queue.