move row basis calculation into after phase1