from sealed class to record
fix type