working version
fixes