initial public version - still work in progress