Thanks for the speedy reply
I've adjusted the diagram, attached.
I'm still unsure of how to write the code for it though?