add types only with unique names
add tes fot unique name; do little refactoring