added some logic for ensuring organisation exists (is created if necessary)