modified run_queue and added wait_queue