refactor+types