adding previous codes