replaced recordqueue with stl queue