Would be better to replace this with deriving.