add some tests and fix method chaining parsing