updated the first working version