made flagOpacity boolean by default