export queue functions to own module, add functions for queue handling