remove unused type
add unit tests