fix workflow and rearrange parameters