cleaned AVC code