adding read queue func