initial version - very much alpha quality code