Created changeFlag method

Signed-off-by: Jerome Gingras <jerome.gingras@gmail.com>