changed flag params from yes/no to 1/0