refactoring types