add transform action before convert to batch

also added some tests