added some updates from old pull requests