add to_h and to_yaml to target class