Updated model class and implemented transform function.