implemented full type support and tests