replace include and method invocations