use class instead of object to avoid serialization issues