dataClass - if func then return object