messing with code for type safety