added an explanation comment
removed redundant begin block