Rebased with original fork

* didn't squash this pull request cuz it was doing something really weird with master