before convert code