refactor name and types