generates queue