select parsing, some tests, not full test coverage