seperated pug and queue almost completed functions for pug .8 to alpha