misc changes and debugging attempts
merge with master