Refactored method of queueing jobs