some type safety chenges