Trump takes credit for legislation signed by Obama