ast data structure and tests