misc modifications
fixed merge?
merged and debugged