merge from working version