working on type safety