write_der returns a Vec