How to create custom data classes