added versioning
support for allocate(terminate_on_empty_queue=True)