Add substitute values

Happy with this implementation, @ccare?