refactor in BEGIN/END section