refactor ymp.types