updates for type correctness