working version
fixed conflicts