Writing code for accurate runlist