add tests for type stability