more work done, need to reevaluate the retrieve class - use a stl queue