added parameter for cipher mode