remove redundant begin block