adding some type safety