working version before I start larger changes