merging a working version, previous version was broken