New PR

Here is the my new pull request with @theory changes.