major progress, refactored but old stuff still there