Made some changes, remove frameNo as it is not really needed