add deriving to objects