first pass and partially functional

Signed-off-by: Roy Storey <roy.storey@plantandfood.co.nz>