added flow diagrams