just a basic working copy, changes to follow then will submit pull request