broken things repaired, first working version!