redesign singleton & queue.