more changes, but first working version