add new code to correct errors