refined typesystem