updated with first working version