added ParseFlags parameters to functions