make sure to return from type()