first fundamentally working version