changes for type stability