refactor and consolidate
almost ready to fire it up