misc changes and code