type safety added