added logic to change the markers based on flow data